//
//  UpdateViewController.m
//  CPU_Utility
//
//  Created by leonardo on 15/10/19.
//  Copyright © 2015年 leonardo. All rights reserved.
//

#import "UpdateViewController.h"
//#import "UpdateLeaderModeComtroller.h"
#import "SearchViewController.h"
#import "CPUDetailModel.h"
#import "CompareViewController.h"
@interface UpdateViewController ()<ReturnCPUDelegate>{
    CPUDetailModel * CPUOld;
    CPUDetailModel * CPUUpdate;
    
}
@property (weak, nonatomic) IBOutlet UIButton *btnLeaderMode;

@end

@implementation UpdateViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    [_btnLeaderMode.titleLabel sizeToFit];
    [_btnLeaderMode setNeedsDisplay];
    [_btnLeaderMode addTarget:self action:@selector(btnLeaderModeClicked:) forControlEvents:UIControlEventTouchUpInside];
}
-(void)btnLeaderModeClicked:(UIButton*)sender{
   SearchViewController  * vc = [SearchViewController new];
    vc.title = @"小白引导模式";
    vc.hidesBottomBarWhenPushed = YES;
    vc.isFromSelectOldCPU = YES;
    vc.compareViewController.returnCPUDelegate  = self;
    [self.navigationController pushViewController:vc animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(void)setCPU:(CPUDetailModel *)model withIsOld:(BOOL)isOldCPU{
    if (isOldCPU) {
        CPUOld = model;
    }
    else{
        CPUUpdate = model;
    }
  
}
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}


@end
